package com.ddyx.rest;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.IImgUploadService;

@Controller
@RequestMapping("/imgUpload")
public class ImgUploadController {
	
	@Resource
	IImgUploadService service;
	
	/**
	 * 店员上传图片 获取token
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="upload",method=RequestMethod.GET)
	public Map<String, String> upload(
			@RequestParam(required=true) String wxUid,
			@RequestParam(required=true) String wxSid
			) {
		return service.uploadImg(wxUid,wxSid);
	}
	
	
}
